package com.dataseek.iot.mysql.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author cc
 * @since 2021-09-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "MQTT topic")
public class MqttTopic implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "topic_inner_id", type = IdType.AUTO)
    private Long topicInnerId;

    /**
     * 客户端ID
     */
    @ApiModelProperty(value = "设备编码等同于客户端ID",required = true)
    private String deviceCode;

    /**
     * topic 编码，包含productId,deviceId
     */
    @ApiModelProperty(value = "topic编码",required = true)
    private String topicCode;

    /**
     * topic 名称
     */
    @ApiModelProperty(value = "topic名称",required = true)
    private String topicName;

    /**
     * 创建时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private String createTime;

    /**
     * 更新时间
     */
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private String updateTime;

    /**
     * 启用
     */
    @ApiModelProperty(value = "是否启用",required = true)
    private boolean used;


}
